package com.ranjiaqi.set;

import java.util.HashSet;
import java.util.Set;

/**
 * @ClassName TestSet
 * @Description TODO
 * @Author hp
 * @Date 2021/6/24 8:38
 * @Version 1.0
 **/
public class TestSet {
    public static void main(String[] args) {
        //创建Set集合对象，用实现类
        Set<String> stringSet = new HashSet<>();
        stringSet.add("a");
        stringSet.add("e");
        stringSet.add("b");
        stringSet.add("c");
        for (String str : stringSet) {
            System.out.println("stringSet = " + str);
        }
    }
}
